<?php
header ( 'Content-Type:text/html; charset=UTF-8' );
@$xid = $_REQUEST ['xid'];
$pdo = new PDO ( 'mysql:dbname=crm; charset=utf8', 'root' );
$s = $pdo->prepare ( 'select * from username where id=:aa' );
$s->execute ( array (
		'aa' => $xid 
) );
$data = $s->fetch ( PDO::FETCH_NAMED );

$xgdom='<div class="col-xs-6 col-xs-offset-3">
	<div class="panel panel-primary">
		<div class="panel-heading">
			<div class="panel-lilte">
				<span class="glyphicon glyphicon-edit"> <b>修改信息</b>
				</span>
			</div>
		</div>
		<div class="panel-body">
			<form class="form-horizontal" id="formzc">
				<div class="form-group">
					<label class="control-label col-xs-4">帐号:</label>
					<div class="col-xs-6">
						<input class="form-control" placeholder="'. $data['name'].'"
							name="zcusername" />
					</div>
				</div>
				<div class="form-group">
					<label class="control-label col-xs-4">密码:</label>
					<div class="col-xs-6">
						<input class="form-control" required="required"
							placeholder="'.$data['password'].'" name="zcpassword"
							id="zcpassword" />
					</div>
				</div>
				<div class="form-group">
					<label class="control-label col-xs-4">身份:</label>
					<div class="col-xs-6">
						<input class="form-control" required="required"
							placeholder="'. $data['sf'].'" name="qrpassword" />
					</div>
				</div>
				<div class="form-group">
					<label class="control-label col-xs-4">姓名:</label>
					<div class="col-xs-6">
						<input class="form-control" required="required"
							placeholder="'. $data['xm'].'" name="xm" />
					</div>
				</div>
				<div class="form-group">
					<label class="control-label col-xs-4">手机:</label>
					<div class="col-xs-6">
						<input class="form-control" required="required"
							placeholder="'. $data['tel'].'" name="tel" />
					</div>
				</div>
				<div class="form-group">
					<label class="control-label col-xs-4">地址:</label>
					<div class="col-xs-6">
						<input class="form-control" placeholder="'. $data['dizhi'].'"
							name="dizhi" />
					</div>
				</div>
				<div class="form-group">
					<input class="btn btn-primary  col-xs-offset-4" id="xg"
						type="button" value="修改" /> <input id="xgtc" class="btn" type="button"
						value="退出" />
				</div>
			</form>
		</div>
	</div>
</div>';
echo json_encode ( array (
		'xgdom' => $xgdom
) );
